package com.shop.filter;

import java.io.IOException;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;

public class EncodeFilter implements Filter {
	public void destroy(){}
	public void doFilter(ServletRequest req,ServletResponse res,FilterChain chain) 
	throws IOException,ServletException{
		HttpServletRequest request = (HttpServletRequest)req;
		request.setCharacterEncoding("UTF-8");
		chain.doFilter(req,res);
	}
	public void init(FilterConfig arg0) throws ServletException{}
}
